<?php

namespace Admin\Model;

use Think\Model;

class ArticleModel extends Model
{
    protected $_validate = array(
        array('cate_id','require','文章分类不能为空！',self::MUST_VALIDATE ,'require',self::MODEL_INSERT),
        array('title','require','文章标题不能为空！',self::MUST_VALIDATE ,'require',self::MODEL_BOTH), // 验证确认密码是否和密码一致
        array('author','require','文章作者不能为空！',self::MUST_VALIDATE ,'require',self::MODEL_BOTH), // 验证确认密码是否和密码一致
        array('content','require','文章内容不能为空！',self::MUST_VALIDATE ,'require',self::MODEL_BOTH), // 验证确认密码是否和密码一致
        array('title','unique','文章标题不能重复！',self::MUST_VALIDATE ,'unique',self::MODEL_INSERT),
        array('content','unique','文章内容不能重复！',self::MUST_VALIDATE ,'unique',self::MODEL_INSERT),

    );
}